// -----------------------------------------------
// Author:     code34 nicolas_boiteux@yahoo.fr
// Edited by:  Neumatic
// Warcontext: Add score to a player depend of his ranking
// -----------------------------------------------

private ["_ratio","_score"];

_score = _this select 0;

// Player should be in team
if ((name player) in wcinteam) then {
	switch (rank player) do {
		case "Private": {    _ratio = (ceil (_score * 0.4)) };
		case "Corporal": {   _ratio = (ceil (_score * 0.5)) };
		case "Sergeant": {   _ratio = (ceil (_score * 0.6)) };
		case "Lieutenant": { _ratio = (ceil (_score * 0.7)) };
		case "Captain": {    _ratio = (ceil (_score * 0.8)) };
		case "Major": {      _ratio = (ceil (_score * 0.9)) };
		case "Colonel": {    _ratio = (ceil (_score)) };
	};

	wcteamplayscore = wcteamplayscore + _ratio;
};